class ControlledInput extends React.Component {
    constructor(props) {
        super(props);
        this.state = {
            input: ''
        };
        // change code below this line
        this.inputChange = this.inputChange.bind(this)
        // change code above this line
    }
    // change code below this line
    inputChange(e){
        const { value} = e.target;
        this.setState({input:value})
    }
    // change code above this line
    render() {
        return (
            <div>
                { /* change code below this line */}
                <input type="text" value={this.state.input} onChange={this.inputChange}/>
                { /* change code above this line */}
                <h4>Controlled Input:</h4>
                <p>{this.state.input}</p>
            </div>
        );
    }
};